<template>
  <div class="print">
    <h1>This is an print page</h1>
    <button @click="showPdf">showPdf</button>
    <!--    <div class="print-wrapper">-->
    <!--      <iframe-->
    <!--        src="http://storage.xuetangx.com/public_assets/xuetangx/PDF/PlayerAPI_v1.0.6.pdf"-->
    <!--        frameborder="0"-->
    <!--      ></iframe>-->
    <!--    </div>-->
  </div>
</template>
<script>
// import pdf from '../components/pdf';
export default {
  created() {
    this.showPdf();
  },
  methods: {
    showPdf() {
      // let url = 'http://127.0.0.1:9999/PlayerAPI_v1.0.6.pdf';
      let url =
        "http://storage.xuetangx.com/public_assets/xuetangx/PDF/PlayerAPI_v1.0.6.pdf";
      //let url = 'https://ecs7.tokopedia.net/instant-loan/file/29a2218e-bef9-44cb-b92b-8e81bc4d5228_DOC-20171013-WA0035.pdf'
      this.$showPDF(url);
    }
  }
};
</script>
<style lang="less" scoped>
.print-wrapper {
  width: 100%;
  height: 100%;

  iframe {
    width: 100%;
    height: 80vh;
  }
}
</style>
